package cn.tecnova.bean

/**
  * description:封装EventRelationArticle表的类
  **/

case class EventRelationArticle(
                            val id:String,
                            val user_d:String,
                            val event_id:String,
                            val event_name:String,
                            val article_id:String,
                            val site_name:String,
                            val media_cls:String,
                            val article_title:String,
                            val article_author:String,
                            val site_url:String,
                            val article_area:String,
                            val article_pubdate:String,
                            val hit_words:String,
                            val positive_word_cloud:String,
                            val negative_word_cloud:String,
                            val hot_words:String,
                            val sentiment_analysis:String,
                            val summary:String,
                            val nlp_sort:String,
                            val relation_words:String,
                            val risk_score:String,
                            val risk_reason:String,
                            val weight_sort:String,
                            val update_time:String,
                            val article_content:String,
                            val topic_type:String
)extends Product with Serializable{

  override def productElement(n: Int) = n match {

    case 0 => id
    case 1 => user_d
    case 2 => event_id
    case 3 => event_name
    case 4 => article_id
    case 5 => site_name
    case 6 => media_cls
    case 7 => article_title
    case 8 => article_author
    case 9 => site_url
    case 10 => article_area
    case 11 => article_pubdate
    case 12 => hit_words
    case 13 => positive_word_cloud
    case 14 => negative_word_cloud
    case 15 => hot_words
    case 16 => sentiment_analysis
    case 17 => summary
    case 18 => nlp_sort
    case 19 => relation_words
    case 20 => risk_score
    case 21 => risk_reason
    case 22 => weight_sort
    case 23 => update_time
    case 24 => article_content
    case 25 => topic_type
  }

  override def productArity = 26

  override def canEqual(that: Any) = that.isInstanceOf[EventRelationArticle]
}
object EventRelationArticle {

  def apply(arr:Array[String]):EventRelationArticle= EventRelationArticle(
    arr(0),
    arr(1),
    arr(2),
    arr(3),
    arr(4),
    arr(5),
    arr(6),
    arr(7),
    arr(8),
    arr(9),
    arr(10),
    arr(11),
    arr(12),
    arr(13),
    arr(14),
    arr(15),
    arr(16),
    arr(17),
    arr(18),
    arr(19),
    arr(20),
    arr(21),
    arr(22),
    arr(23),
    arr(24),
    arr(25)
  )

}
